<template>
    <div>
        <template>
            <!-- 轮播图 -->
            <el-carousel :interval="4000" type="card" height="400px">
                <el-carousel-item v-for="item in pics" :key="item.id">
                    <img :src="item" alt />
                    <img
                        src='item'
                    />
                </el-carousel-item>
            </el-carousel>
        </template>
        <el-row>
            <el-col :span="8" v-for="(o) in 6" :key="o">
                <el-card :body-style="{ padding: '0px' }">
                    <img
                        src="https://gitee.com/MarkPolaris/images/blob/master/mysql/mysql_20190613_1631.png"
                        class="image"
                    />
                    <div style="padding: 14px;">
                        <span>好吃的汉堡</span>
                        <div class="bottom clearfix">
                            <time class="time">{{ currentDate }}</time>
                            <el-button type="text" class="button">操作按钮</el-button>
                        </div>
                    </div>
                </el-card>
            </el-col>
        </el-row>
    </div>
</template>

<script>
export default {
    data() {
        return {
            currentDate: new Date(),
            pics: [
                "https://i.loli.net/2019/08/22/QEB1RLTq3FogdVI.jpg",
                "https://i.loli.net/2019/08/22/f3PRWu8vbBAZVz6.jpg",
                "https://i.loli.net/2019/08/22/o8kRSzuxNqZ6Lje.jpg",
                "https://i.loli.net/2019/08/22/F6RJoqhGmYxcBya.jpg",
            ]
        };
    },
    methods: {
        getUrl(){
            return "https://images.gitee.com/uploads/images/2019/0822/210016_8b879e4f_1775424.png"
        }
    }
};
</script>
<style scoped>
/* .el-carousel__item h3 {
    color: #475669;
    font-size: 14px;
    opacity: 0.75;
    line-height: 200px;
    margin: 0;
  } */

.el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
    background-color: #d3dce6;
}
.time {
    font-size: 13px;
    color: #999;
}

.bottom {
    margin-top: 13px;
    line-height: 12px;
}

.button {
    padding: 0;
    float: right;
}

.image {
    width: 100%;
    height: 300px;
    display: block;
}
.el-card {
    margin: 40px;
}

.clearfix:before,
.clearfix:after {
    display: table;
    content: "";
}

.clearfix:after {
    clear: both;
}
</style>